import service from '@/api/index.ts'

/**
 * 列表
 * @param startDate
 * @param endDate
 * @param projectName
 * @constructor
 */
export const GetListDeposit = async (startDate = null, endDate = null, projectName = null) => {
	// 保函状态 0 初始化  1 已提交 2 已推送 3 驳回
	const { data }: any = await service.post(`/new_mobile/deposit/listDeposit`, {
		startDate,
		endDate,
		projectName,
	})
	return data
}

/**
 * 推送
 * @param allInfoId
 * @param depositNo
 * @param uploadFile
 * @constructor
 */
export const PullDeposit = async (allInfoId: number, depositNo: string, uploadFile: any) => {
	const res: any = await service.post(
		`/new_mobile/deposit/pullDeposit?allInfoId=${allInfoId}&depositNo=${depositNo}`,
		uploadFile,
		{
			headers: {
				'Content-Type': 'multipart/form-data',
			},
		},
	)
	return res
}
